package com.bgs.controller;

import com.bgs.service.AliOssService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@RestController
@RequestMapping("/file")
public class AliOssController {

    @Autowired
    private AliOssService aliOssService;

    @ApiOperation("处理阿里OSS图片")
    @RequestMapping(value = "/handelPic" )
    public String handelPic(MultipartFile file) {
        String upload = aliOssService.upload(file);
        System.out.println(upload);
        return upload;
    }

}
